﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ShellInfrastructure;
using ModulePlaces.Views;
using Microsoft.Practices.Unity;
using Microsoft.Practices.Prism.Regions;
using ModulePlaces.ViewModels;

namespace ModulePlaces
{
    public class PlacesModule : ModulesInfrastructure.SharedModule
    {
        protected override void RegisterViewsInRegions()
        {
            RegionManager.RegisterViewWithRegion(RegionNames.LeftRegionName, () => UnityContainer.Resolve<IPlacesViewList>());
        }

        protected override void RegisterTypesDependencies()
        {
            UnityContainer.RegisterType<IPlacesViewList, PlacesViewList>(new ContainerControlledLifetimeManager());
            UnityContainer.RegisterType<IPlacesViewModel, PlacesViewModel>(new ContainerControlledLifetimeManager());
        }
    }
}
